html {
  --bgc: #ccf;
  width: 100%;
  height: 100%;
  border: 1px solid var(--bgc);
  border-top: none;
  position: absolute;
  z-index: 2147483647;
}
html:has(.MDexport){
  border: none;
}
div#typora-sidebar {
  height: calc(100% - 1px);
}
pre.md-meta-block.md-end-block,
pre.md-fences.md-end-block.ty-contain-cm.modeLoaded[lang="style"],
pre.md-fences.md-end-block[lang="script"],
pre.md-fences.md-end-block[lang="chat"] {
  padding: 5px;
  height: 30px;
  margin-bottom: 4px;
  opacity: 0.2;
  overflow: hidden;
  transition: opacity 0.4s;
}
#typora-source .CodeMirror-lines {
  margin: 0;
  max-width: 100%;
  width: 100%;
}
#typora-source {
  margin: 1px;
}
#typora-source > .CodeMirror {
  max-width: 70%;
}
#write {
  margin: 1px;
  margin-bottom: 600px;
}
.MDexport#write {
  margin-bottom: 10px;
  padding: 10px 16px;
}
pre.md-meta-block.md-end-block.md-focus,
pre.md-fences.md-end-block.ty-contain-cm.modeLoaded.md-focus[lang="style"],
pre.md-fences.md-end-block.md-focus[lang="script"],
pre.md-fences.md-end-block.md-focus[lang="chat"] {
  padding: 16px;
  height: 100%;
  margin-bottom: 10px;
  opacity: 1;
  position: absolute !important;
  background: #fafafa;
  height: fit-content;
  z-index: 999;
  border: 2px solid aqua;
  box-sizing: border-box;
  width: calc(100% - 50px) !important;
}
/* 绝对定位以后，原先占据空间消失了，故需要后一个撑大 */
pre.md-meta-block.md-end-block.md-focus+*,
pre.md-fences.md-end-block.ty-contain-cm.modeLoaded.md-focus[lang="style"]+*,
pre.md-fences.md-end-block.md-focus[lang="script"]+*,
pre.md-fences.md-end-block.md-focus[lang="chat"]+* {
  margin-top: 60px;
}
div.ty-table-edit {
  background: #fafafaee;
}
#write p.title {
  margin: 2px 0;
  text-align: center;
  width: 100%;
  height: 20px;
}
small:has(img) {
  margin: 0;
}
p:has(.img-center), p:has(small:only-child){
  text-align: center;
}
#write .img-center {
  margin: auto;
}
span.md-inline-math:only-child {
  display: block;
  text-align: center;
}
p:has(>span.md-plain:first-child) {
  padding-left: 0 !important;
}
p:has(>span.md-plain:last-child) {
  padding-right: 0 !important;
}
.MDexport .md-fences.md-end-block[lang="style"],
.MDexport .md-fences.md-end-block[lang="chat"],
.MDexport .md-fences.md-end-block[lang="chatgpt"],
.MDexport .md-fences.md-end-block[lang="script"],
.MDexport .md-fences.md-end-block[lang="table"] {
  display: none;
}
.copyBtn {
  border-radius: 4px;
  opacity: 0.4;
}
.copyBtn:hover {
  opacity: 1;
}
div.info-panel-tab {
  margin-top: 0;
}
div.sidebar-content {
  top: 40px;
}
header {
  background-color: var(--bgc);
}
div#typora-sidebar-resizer {
  display: block;
  transition: all 0.3s;
  cursor: grab;
  left: 0;
  width: 20px;
}
.typora-node div#typora-sidebar {
  left: 0;
  color: black;
  background: rgba(250, 250, 250, 0.75);
  border-left: 1px solid rgba(0, 250, 250, 0.15);
}
#top-titlebar {
  height: 28px;
}
.active-tab-files #info-panel-tab-file .info-panel-tab-border,
.active-tab-outline #info-panel-tab-outline div.info-panel-tab-border {
  background: rgba(100, 100, 100, 0.8);
}
.file-node-content {
  color: #333;
}
::-webkit-scrollbar,
::-webkit-scrollbar-button {
  display: none;
}
content::-webkit-scrollbar,
content::-webkit-scrollbar:hover {
  display: block;
  width: 12px;
}
content::-webkit-scrollbar-thumb,
content::-webkit-scrollbar-thumb:hover {
  background-color: rgba(200, 200, 220, 0.4);
  width: 12px;
}
::-webkit-scrollbar-track,
::-webkit-scrollbar-track:hover {
  width: 12px;
}
.export-choice {
  position: absolute;
  left: -1px;
  padding: 5px;
  transition: all 0.2s;
  top: -28px;
  opacity: 0;
  width: 43px;
  font-size: 12px;
  z-index: -2;
  text-align: left;
}
.btn.toolbar-icon.mybtn {
  padding: 5px 13px;
  opacity: 0.5;
}
.btn.toolbar-icon.btnlist:hover {
  opacity: 1;
}
.btn.toolbar-icon.btnlist:hover .export-choice {
  opacity: 1;
}
.btn.toolbar-icon.btnlist:hover .export-choice:nth-child(3) {
  top: calc(27px * 1);
}
.btn.toolbar-icon.btnlist:hover .export-choice:nth-child(4) {
  top: calc(27px * 2);
}
.btn.toolbar-icon.btnlist:hover .export-choice:nth-child(5) {
  top: calc(27px * 3);
}
.btn.toolbar-icon.btnlist:hover .export-choice:nth-child(6) {
  top: calc(27px * 4);
}
.export-choice:hover {
  background-color: aqua !important;
}
body.unibody-window > content {
  left: 0 !important;
  margin: 0 0.4px 0.1px 0;
  background: #fafafa;
}
body #AIbtn {
  display: none;
}
.typora-sourceview-on #AIbtn {
  display: inline-block;
}
.typora-sourceview-on #chat {
  display: block;
}
.typora-sourceview-on #typora-sidebar,
.typora-sourceview-on #typora-sidebar-resizer {
  display: none !important;
}
#chat {
  display: none;
  position: absolute;
  z-index: 100;
  min-width: 200px;
  top: 30px;
  width: 28%;
  right: 2px;
  bottom: 2px;
}
#aiarea {
  width: 100%;
  height: 20%;
  padding: 5px 10px;
  min-height: 40px;
  border: 2px solid aqua;
  border-radius: 8px;
  transition: all 0.3s;
  position: absolute;
  left: 0;
  bottom: 0;
}
#aiarea:focus {
  outline: 2px solid yellow;
}
.record {
  border: 1px solid rgba(200, 200, 220, 0.5);
  background: rgba(230, 230, 240, 0.2);
  border-radius: 6px;
  padding: 1px 6px;
  margin: 8px 6px;
  min-height: 26.4px;
  font-size: 14px;
  color: #222;
}
div#record {
  width: 100%;
  height: 80%;
  overflow: scroll;
}
.chatbtn {
  position: absolute;
  bottom: 20%;
  border-radius: 6px;
  border: none;
  padding: 1px 3px;
  opacity: 0.8;
  background: #0ff6;
  margin-bottom: 2px;
}
.chatbtn:hover {
  opacity: 1;
  background: #0ff;
}
#aiRes:before {
  content: "Residue:";
}
#aiRes:after {
  content: "W";
}
#switch-pin-btn .ty-icon:before {
  content: "";
}
#AIlogin {
  display: none;
  height: 100%;
  background: rgba(240, 240, 250, 0.8);
  padding: 20px;
  text-align: center;
  border-radius: 8px;
  position: relative;
  top: -500px;
  transition: all 0.3s;
}
#AIlogin tr td:first-child {
  text-align: right;
  width: 40%;
}
#AIlogin span {
  padding: 8px 20px;
  margin: 0 20px;
  background: #ddd;
  border-radius: 6px;
  font-weight: bold;
}
.modal-login .modal-content {
  display: none;
}
.modal-login #AIlogin {
  display: block;
}
#AIlogin tr {
  border: none;
  background: none;
  display: none;
}
#AIlogin td {
  border: none;
  padding: 5px 2px;
}
#AIlogin span:hover {
  background: aqua;
  cursor: pointer;
}
#AIlogin input {
  border: 1px solid #ddd;
  border-radius: 4px;
}
div#AIlogin.login-login {
  top: 1px;
}
div#AIlogin.login-reg {
  top: 30px;
}
div#AIlogin.login-pws {
  top: 12px;
}
#common-dialog .modal-dialog {
  margin-top: 80px;
}
.modal-login {
  display: block !important;
  background: rgba(0, 0, 0, 0.2);
}
#aiVer::before {
  content: "Version:";
}
#AIlogin.login-login span.log {
  background: lavender;
}
#AIlogin.login-reg span.reg {
  background: lavender;
}
#AIlogin.login-pws span.pws {
  background: lavender;
}
#AIlogin.login-login .btn:before {
  content: "Login";
}
#AIlogin.login-reg .btn:before {
  content: "Register";
}
#AIlogin.login-pws .btn:before {
  content: "Reset";
}
#AIlogin.login-login .login-login,
#AIlogin.login-pws .login-pws,
#AIlogin.login-reg .login-reg {
  display: inherit;
}
figure.triLine tr,
figure.triLine thead th,
figure.triLine tbody td {
  border: none;
  background: inherit;
}
figure.triLine thead tr {
  border-top: 1px solid #111;
  border-bottom: 1px solid #111;
}
figure.triLine tbody {
  border-bottom: 1px solid #111;
}
figure.noHead tr th {
  font-weight: normal;
}
figure.noHead thead {
  background: inherit;
}
figure.noDiff table tr:nth-child(2n),
figure.noDiff thead {
  background: inherit;
}
figure.noBorder tr,
figure.noBorder tr th,
figure.noBorder tr td {
  border: none;
}
pre.md-fences.md-end-block[lang="table"] {
  height: 0;
  overflow: hidden;
  opacity: 0;
  transition: all 0.3s;
  padding: 0;
  margin: 0;
}
figure.allCenter table {
  margin: 0 auto;
  width: fit-content;
  text-align: center;
}
pre.md-fences.md-end-block.md-focus[lang="table"] {
  height: auto;
  opacity: 1;
}
figure.triLine table {
  border-top: 2px solid #333;
  border-bottom: 2px solid #333;
}
figure.fitCenter table {
  width: fit-content;
  margin: 0 auto;
}
figure {
  margin: 0;
}
span.md-image {
  display: inline-block;
}
#w-titlebar-left .toolbar-icon {
  margin-left: 20px;
}
@media print {
  body div#write {
    padding: 0;
  }
  body.typora-export {
    margin: 0;
    padding: 0;
  }
  @page: first {
  }
  @page: blank {
  }
  @page: left {
    margin-left: 13mm;
    margin-right: 16mm;
  }
  @page: right {
    margin-left: 16mm;
    margin-right: 13mm;
  }
  @page {
    @top-center {
      content: "Page " counter(pageNumber);
    }
  }
}
p:has(span.md-plain) > span:has(img):first-child, p:has(span)>small:has(img):first-child {
  position: absolute;
  top: 0;
  left: 0;
  width: fit-content;
}
p:has(span.md-plain) > span:has(img):last-child, p:has(span)>small:has(img):last-child {
  position: absolute;
  top: 0;
  right: 0;
  width: fit-content;
}
p > img:only-child {
  float: none !important;
}
p:has(img):after {
  content: "";
  display: block;
  height: 0;
  clear: both;
  visibility: hidden;
}
p.title + table,
img + p.title,
h1 + h2 {
  page-break-before: avoid;
  page-break-inside: avoid;
}
/* .md-table-fig, */
.md-image,
p:has(img),
div:has(img),
.md-diagram-panel-preview,
svg {
  page-break-inside: avoid;
}
p img.img-center {
  float: none;
}
span img {
  border: 0;
}

.md-expand.md-img-loaded > .md-meta {
  position: absolute;
  z-index: 999;
  background: #fafafaf0;
  box-shadow: 1px 1px 3px 2px #3336;
  box-sizing: content-box;
  width: 100%;
  left: 0;
}